import { dwHttp } from '@/utils/http';
//登录
export const useLoginApi = (loginCode: string, password: string) => {
  return dwHttp({
    method: 'post',
    data: {
      loginCode: loginCode,
      loginPassword: password,
    },
    url: '/admin-api/auth/login',
  });
};

export const useLoginUserApi = () => {
  return dwHttp({
    method: 'get',
    isSuccessTip: false,
    url: '/admin-api/auth/login/user',
  });
};

//退出登录
export const uesLogoutApi = () => {
  return dwHttp({
    method: 'post',
    isSuccessTip: false,
    url: '/admin-api/auth/logout',
  });
};
